﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace VigenereForms
{
    public partial class frmMain : Form
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            MyEncode.EnCode();
            textBox3.Text = MyEncode.CipherText;
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            MyEncode.PlainText = textBox1.Text;
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {
            MyEncode.Key = textBox2.Text;
        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {
            
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.textBox3.Focus();//获取焦点
            this.textBox3.SelectAll();//全选内容
            this.textBox3.Copy();//拷贝内容
        }
    }
}
